package cn.iocoder.yudao.core.sensitive.annotation;

import cn.iocoder.yudao.core.sensitive.SensitiveInfoSerialize;
import cn.iocoder.yudao.core.sensitive.SensitiveType;
import com.fasterxml.jackson.annotation.JacksonAnnotationsInside;
import com.fasterxml.jackson.databind.annotation.JsonSerialize;

import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;

@Retention(RetentionPolicy.RUNTIME)
@JacksonAnnotationsInside
@JsonSerialize(
        using = SensitiveInfoSerialize.class
)
public @interface FieldSensitive {

    /**@see SensitiveType
     * type参考
     * <table style="width:400px" border>
     * <tr valign=top><th>脱敏示例</th>
     *  <tr valign=top><th> </th>@sink
     * <tr align=right  ><td style="font-weight:bold">type</td> <td style="font-weight:bold">脱敏前</td>  <td style="font-weight:bold">脱敏后</td>
     * <tr align=right><td>chineseName</td> <td>张三四</td>  <td>张**</td>
     * <tr align=right><td>idCard</td><td>432145167805126789</td>  <td>4321**********6789</td>
     * <tr align=right><td>fixedPhone</td><td>076512344321</td>  <td>********4321</td>
     * <tr align=right><td>mobile</td><td>15678900987</td>  <td>156****0987</td>
     * <tr align=right><td>address</td><td>北京市东城区东华门街道北京香江戴斯酒店</td>北京市东城*****戴斯酒店 <td></td>
     * <tr align=right><td>email</td><td>23345@qq.com</td>  <td>2****@qq.com</td>
     * <tr align=right><td>bankCard</td><td>6212262502009182455</td>  <td>6212***********2455</td>
     * <tr align=right><td>password</td><td>123456789</td>  <td>*********</td>
     * </table>
     */
    String type() ;
}
